#include <STC15F2K60S2.H>
#include "smg.h"
#include "DS18B20.h"
#include "OneWire.h"

unsigned char ack;
float Temp;

void main()
{
	All_Init();	
	ack = OneWire_Init();
	
	DS18B20_ConvertT();	//先转换1次，
	Delay_ms(1000);		//再延时1s，就不会显示默认温度25了
	
	while(1)
	{
		DS18B20_ConvertT();
		Temp =  DS18B20_ReadT();	//float类型
		
		SMG_ShowFloatNum(Temp);
        
//        P2 = 0xC0;	//Y6=0;Y6C=1; 使能锁存器U8     P27 = 1; P26 = 1; P25 = 0;
//		P0 = 0x01;
//        P2 = 0xFF;	//Y7=0;Y7C=1; 使能锁存器U7     P27 = 1; P26 = 1; P25 = 1;
//        P0=NixieTable[1];//数字
	}
}
